#include "Provider{{ entity.name }}.h"

#include "core/AppSignals.h"

Provider{{ entity.name }}::Provider{{ entity.name }}()
    : PropertyProvider()
{
}

void Provider{{ entity.name }}::initEditor(
    QtTreePropertyBrowser* editor,
    shared_ptr<BaseElement> entity
)
{
    entity_ = dynamic_pointer_cast<uml::{{ entity.name }}>(entity);
    propertyToId.clear();
    PropertyProvider::initEditor(editor, entity);

{{get_init_statement()}}
}

void Provider{{ entity.name }}::valueChanged(QtProperty* property, bool value)
{
    QString id = propertyToId[property];
    {{get_value_changes_bool()}}
}

void Provider{{ entity.name }}::valueChanged(QtProperty* property, double value)
{
    QString id = propertyToId[property];
    {{get_value_changes_double()}}
}

void Provider{{ entity.name }}::valueChanged(QtProperty* property, int value)
{
    QString id = propertyToId[property];
    {{get_value_changes_int()}}
}

void Provider{{ entity.name }}::valueChanged(QtProperty* property, QString value)
{
    QString id = propertyToId[property];
    {{get_value_changes_string()}}
}
